#include<iostream>
#include<pthread.h>
#include<unistd.h>
int cnt=0;
void* pthreadrun1(void* data)
{
while(1)
{
  cnt++;
}


}
void* pthreadrun2(void* data)
{
cnt++;
}
using namespace std;
int main()
{
pthread_t t1,t2;
pthread_create(&t1,NULL,pthreadrun1,NULL);
pthread_create(&t2,NULL,pthreadrun2,NULL);
while(1)
{

cout<<cnt<<endl;
sleep(1);
}


  return 0;
}
